MKL_0 = [2000 2000 2000 0 688.078 ;  2500 2500 2500 0 1345.58 ;  3000 3000 3000 0 2271.38 ;  3500 3500 3500 0 3653.2 ;  4000 4000 4000 0 5360.56 ;  4500 4500 4500 0 7755.14 ;  5000 5000 5000 0 10467.9 ;  5500 5500 5500 0 14034.4 ;  6000 6000 6000 0 18074.9 ;  6500 6500 6500 0 23077.5 ;  7000 7000 7000 0 28412.4 ;  7500 7500 7500 0 35471.9 ; ];

STRASSEN_1 = [2000 2000 2000 1 667.291 ;  2500 2500 2500 1 1294.84 ;  3000 3000 3000 1 2167.26 ;  3500 3500 3500 1 3432.32 ;  4000 4000 4000 1 4959.95 ;  4500 4500 4500 1 7345.13 ;  5000 5000 5000 1 9830.11 ;  5500 5500 5500 1 13104.8 ;  6000 6000 6000 1 16521.5 ;  6500 6500 6500 1 21425.8 ;  7000 7000 7000 1 26377.8 ;  7500 7500 7500 1 32499.3 ; ];
STRASSEN_2 = [2000 2000 2000 2 661.54 ;  2500 2500 2500 2 1251.32 ;  3000 3000 3000 2 2138.93 ;  3500 3500 3500 2 3485.46 ;  4000 4000 4000 2 4836.33 ;  4500 4500 4500 2 7094.94 ;  5000 5000 5000 2 9403.85 ;  5500 5500 5500 2 12559.1 ;  6000 6000 6000 2 15789.5 ;  6500 6500 6500 2 20251.9 ;  7000 7000 7000 2 24848.1 ;  7500 7500 7500 2 30967.1 ; ];
STRASSEN_3 = [2000 2000 2000 3 672.179 ;  2500 2500 2500 3 1288.86 ;  3000 3000 3000 3 2296.55 ;  3500 3500 3500 3 3592.95 ;  4000 4000 4000 3 4887.59 ;  4500 4500 4500 3 7136.78 ;  5000 5000 5000 3 9181.16 ;  5500 5500 5500 3 12565.4 ;  6000 6000 6000 3 15561.1 ;  6500 6500 6500 3 20792.9 ;  7000 7000 7000 3 25249.2 ;  7500 7500 7500 3 31584.1 ; ];

DALBERTO_PIPED = [2000, 2.359521e+04; ...
    2500, 2.389718e+04; ...
    3000, 2.340498e+04; ...
    3500, 2.642449e+04; ...
    4000, 2.636101e+04; ...
    4500, 2.680813e+04; ...
    5000, 2.720070e+04; ...
    5500, 2.737460e+04; ...
    6000, 2.792689e+04; ...
    6500, 2.852443e+04; ...
    7000, 2.848919e+04; ...
    7500, 2.937541e+04];

CAPS = [2048, max(2.788814, max(0.865598, 0.247636)); ...
    4096, max(21.836115, max(3.080121, 1.007763)); ...
    8192, max(23.075505, max(24.686958, 0))];

MKL_DIMS = MKL_0(:, 1);
MKL_PERF = perf(MKL_0);

OUR_DIMS = STRASSEN_1(:, 1);
OUR_PERF = max(max(perf(STRASSEN_1), perf(STRASSEN_2)), perf(STRASSEN_3));

DALBERTO_DIMS = DALBERTO_PIPED(:, 1);
DALBERTO_PERF = DALBERTO_PIPED(:, 2) / 1000;

CAPS_DIMS = CAPS(:, 1);
CAPS_PERF = CAPS(:, 2);

lw = 1.75;      % LineWidth
msz = 12;       % MarkerSize
make_plot_pre(8, 6);
plot(MKL_DIMS, MKL_PERF, 'black*-', ...
     OUR_DIMS, OUR_PERF, 'bp--', ...
     DALBERTO_DIMS, DALBERTO_PERF, 'ro--', ...
     ...%CAPS_DIMS, CAPS_PERF, 'gs--', ...
     'LineWidth', lw, 'MarkerSize', msz);
 legend('MKL DGEMM', 'Code generated Strassen', ['D''', 'Alberto Strassen-Winograd'], 'CAPS', ...
     'Location', 'SouthEast');
 title('Sequential performance on N x N x N');
 ylim([20, 30]);
 xlabel('dimension (N)'); ylabel('Effective GFLOPS');
 make_plot_post(8, 6);
 print('fast-matmul_paper_figs/comp_perf','-depsc','-r300');
 